import Vue from 'vue';
import App from './App.vue';
import router from './router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios';
import store from './store';

Vue.config.productionTip = false;
Vue.use(ElementUI);

// 将 axios 挂载到 Vue 实例上
Vue.prototype.$axios = axios;

// 处理 ResizeObserver 错误
const handleError = (event) => {
  if (event.message === 'ResizeObserver loop completed with undelivered notifications.') {
    event.stopImmediatePropagation();
  }
};

window.addEventListener('error', handleError, true);

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');